package com.cskaoyan.wxcontroller;

import com.cskaoyan.bean.baseresultVO.BaseData;
import com.cskaoyan.bean.baseresultVO.BaseParam;
import com.cskaoyan.bean.baseresultVO.BaseRespVo;
import com.cskaoyan.bean.domain.User;
import com.cskaoyan.service.FootPrintService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @User: Yr
 * @Date: 2021/12/4
 * @Description:
 */

@RestController
@RequestMapping("wx/footprint")
public class WxFootPrintController {

    @Autowired
    FootPrintService footPrintService;

    // http://182.92.235.201:8083/wx/footprint/list?page=3&limit=10
    @RequestMapping("list")
    public BaseRespVo list(BaseParam baseParam){
        Subject subject = SecurityUtils.getSubject();
        User user = (User) subject.getPrincipal();
        BaseData data = footPrintService.list(baseParam,user.getId());
        return BaseRespVo.ok(data);

    }



}
